/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package evocarcassonne.core.utils;

import java.util.Random;

/**
 *
 * @author Nobpn
 */
public class Rand {

    static java.util.Random rand;

    private static void init() {
        rand = new Random(System.currentTimeMillis());
    }

    public static int getInt(int n) {

        if (rand == null) {
            init();
        }

        int temp = Math.abs(rand.nextInt());
        int res = temp % n;

        return res;


    }

    public static boolean visible() {
        int res = getInt(2);

        if (res == 0) {
            return false;
        } else {
            return true;
        }
    }
}
